home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / systems / mac / oztex / mf.hqx / Metafont / mfinputs / romanp.mf < prev    next >
Text File  |  1994-08-19  |  6KB  |  120 lines

  1. % This file contains `\$' and `\&' and `?' in the so-called roman style.
  2.  
  3. % Codes \0044, \0046, and \0077 are generated, as well as code |spanish_query|
  4. % (for a Spanish question mark) if that code value is known.
  5.  
  6. cmchar "Dollar sign";
  7. beginchar("$",9u#,body_height#,body_height#-asc_height#);
  8. italcorr fig_height#*slant-.5u#; % same as for digits
  9. adjust_fit(0,0);
  10. numeric theta; theta=90-angle(50u,asc_height); slope:=-asc_height/50u;
  11. pickup fine.nib; pos2(slab,-90);
  12. pos0(cap_stem,theta); pos7(slab,-90);
  13. x2=x0=x7=.5w; top y2l=asc_height+oo; bot y7r=-oo;
  14. y0=.52asc_height; lft x3l=hround u; rt x6r=hround(w-u);
  15. x3r-x3l=x6r-x6l=hround .35[slab,cap_stem]-fine;
  16. ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r;
  17. ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r;
  18. filldraw stroke super_arc.e(2,3) & z3e{down}
  19.  ..z4e---z5e..z6e{down} & super_arc.e(6,7);  % main stroke
  20. if serifs: pos1(hair,0); pos8(hair,180);
  21.  pos10(flare,0); pos9(flare,180);
  22.  rt x1r=hround(w-u); lft x8r=hround u; y1=.5[y0,y2]; y8=.5[y0,y7];
  23.  {{less_tense; pos2'(slab,90); z2'=z2; bulb(2',1,10);  % upper arc and bulb
  24.  bulb(7,8,9)}};  % lower arc and bulb
  25. else: pos1(.6[slab,flare],-100); pos8(flare,-100);
  26.  rt x1l=hround(w-1.3u); lft x8r=hround .8u;
  27.  top y1l=vround .92asc_height+oo; bot y8r=vround .1asc_height-oo;
  28.  filldraw stroke term.e(2,1,right,.9,4);  % upper arc and terminal
  29.  filldraw stroke term.e(7,8,left,1,4); fi  % lower arc and terminal
  30. pickup crisp.nib; pos12(bar,0); pos11(bar,0);
  31. lft x12l=lft x11l=hround(.5w-.5bar); top y12=h; bot y11=-d;
  32. filldraw stroke z12e--z11e;  % vertical crossbar
  33. penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar;
  34.  
  35. cmchar "Ampersand";
  36. beginchar("&",14u#,asc_height#,0);
  37. italcorr x_height#*slant-serif_fit# - if serifs: .4u# else: 1.5u# fi;
  38. adjust_fit(0,serif_fit#);
  39. pickup tiny.nib; pos2(slab,-90); x2=4u; bot y2r=-o;
  40. if not hefty:(x,y2l)=whatever[z2r,(w-5u,x_height)]; x2l:=x; fi
  41. if serifs: pos0(fudged.hair,0);
  42.  rt x0r+jut=hround(w-.9u); top y0=x_height;
  43.  pos1(fudged.hair,0); z1=whatever[z0,(.6[x0,x2],0)];
  44.  y1=max(y0-1.5bracket-.2x_height,2/3x_height);
  45.  filldraw stroke z0e---z1e...{left}z2e;  % short diagonal
  46. else: pickup fine.nib; pos1(.25[slab,flare],-15); rt x1r=hround(w-2u);
  47.  y1r=good.y .75[bar_height,x_height]; x1l:=good.x x1l; y1l:=good.y y1l;
  48.  top z2'l=(x2l,tiny.top y2l); bot z2'r=(x2r,tiny.bot y2r);
  49.  filldraw stroke term.e(2',1,right,1,4); fi  % short diagonal and terminal
  50. pickup tiny.nib; numeric slope,theta,reduced_hair;
  51. slope=(h-2vair-slab)/10.5u; theta=angle(-slope,1);
  52. reduced_hair=max(tiny.breadth,hround(fudged.hair if hefty:-2stem_corr fi));
  53. lft x3r=hround .75u; x5=.5[x3r,x6l]; lft x6r=hround .5(w-u);
  54. x3l-x3r=curve-tiny; pos6(reduced_hair,180);
  55. pos5(vair,theta); y5=.5h;
  56. ellipse_set(2l,3l,4l,5l); ellipse_set(2r,3r,4r,5r);
  57. pos7(vair,270); top y7l=h+o; x7=.45[x6r,x8r];
  58. pos8(fudged.stem,30); x8l=good.x(x8l+3.5u-x8); y8r=y6;
  59. ellipse_set(7l,6l,5',5l);
  60. filldraw stroke z2e{left}...z3e{up}...z4e---z5e...{up}z6e
  61.  ...z7e{left}...z8e{down};  % bowls
  62. pos10(slab,90); x10=w-3.5u; bot y10l=-o;
  63. pos9(fudged.stem,angle(z8-z10)-90);
  64. z9=.5[z8,z10]+(1.75u,0) rotated(angle(z8-z10)+90);
  65. filldraw stroke z8e{down}...z9e{z10-z8}...{right}z10e;  % long diagonal
  66. if serifs: pickup crisp.nib; pos10'(slab,90); z10'=z10;
  67.  pos11(fudged.hair,180); rt x11l=hround(w-u); y11=.5bar_height;
  68.  filldraw stroke z10'e{right}...{up}z11e;  % terminal
  69.  numeric inner_jut; if rt x6l+.5u<lft x0l-1.5jut: inner_jut=1.5jut;
  70.  else: rt x6l+.5u=lft x0l-inner_jut; fi
  71.  dish_serif(0,1,a,.6,inner_jut,b,.5,jut)(dark);  % serif
  72. else: pickup fine.nib; pos10'(slab,90); z10'=z10;
  73.  pos11(Vround .5[slab,flare],90);
  74.  rt x11=hround(r-letter_fit-u); bot y11l=vround .07bar_height-o;
  75.  filldraw stroke term.e(10',11,right,1,4); fi  % terminal
  76. penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
  77.  
  78. cmchar "Question mark";
  79. beginchar("?",8.5u#,asc_height#,0);
  80. italcorr .8asc_height#*slant;
  81. adjust_fit(0,0);
  82. pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90);
  83. lft x7l=hround(.5w-.25u-.5dot_size); bot y8l=0; z7=z8; dot(7,8);  % dot
  84. numeric bot_width;
  85. bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
  86. pickup fine.nib; pos2(vair,90); pos3(curve,0);
  87. pos4(vair,-90); pos5(bot_width,0); pos6(bot_width,0);
  88. x2=x4=x5=x6=x7; rt x3r=hround(w-u); bot y6=1+.25[top y8r,x_height];
  89. top y2r=h+oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
  90. {{interim superness:=more_super;
  91. filldraw stroke pulled_super_arc.e(2,3)(superpull)
  92.  & subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}};  % arc and stem
  93. if serifs: pos1(hair,180); pos0(flare,180);
  94.  lft x1r=hround u; y1=y3; bulb(2,1,0);  % bulb
  95. else: pos1(Vround 5/7[vair,flare],110);
  96.  lft x1r=hround u; top y1r=vround .9[y6,top y2r];
  97.  filldraw stroke term.e(2,1,left,1,4); fi  % terminal
  98. penlabels(0,1,2,3,4,5,6,7,8); endchar;
  99.  
  100. iff known spanish_query: cmchar "Spanish open question mark";
  101. beginchar(spanish_query,8.5u#,asc_height#-desc_depth#,desc_depth#);
  102. adjust_fit(0,0);
  103. pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90);
  104. lft x7l=hround(.5w-.25u-.5dot_size); top y8r=h; z7=z8; dot(7,8);  % dot
  105. numeric top_width;
  106. top_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
  107. pickup fine.nib; pos2(vair,270); pos3(curve,180);
  108. pos4(vair,90); pos5(top_width,180); pos6(top_width,180);
  109. x2=x4=x5=x6=x7; lft x3r=hround u; top y6=.25[bot y8l,h-x_height]-1;
  110. bot y2r=-d-oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
  111. {{interim superness:=more_super;
  112. filldraw stroke pulled_super_arc.e(2,3)(superpull)
  113.  & subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}};  % arc and stem
  114. if serifs: pos1(hair,0); pos0(flare,0);
  115.  rt x1r=hround(w-u); y1=y3; bulb(2,1,0);  % bulb
  116. else: pos1(Vround 5/7[vair,flare],-70);
  117.  rt x1r=hround(w-u); bot y1r=vround .9[y6,bot y2r];
  118.  filldraw stroke term.e(2,1,right,1,4); fi  % terminal
  119. penlabels(0,1,2,3,4,5,6,7,8); endchar;
  120.